package com.education.myoschinatest.ui.home;

import android.os.Handler;
import android.os.Looper;

import com.education.myoschinatest.MyApp;
import com.education.myoschinatest.bean.DataBean;
import com.education.myoschinatest.bean.RoomBean;
import com.education.myoschinatest.http.HttpUtils;
import com.education.myoschinatest.http.MyHttpBody;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by zhonghang on 16/8/30.
 */

public class HomePresenter implements HomeContract.Presenter {
    private HomeContract.View view;
    private HomeContract.Modle modle;

    public HomePresenter(HomeContract.View view) {
        this.view = view;
        modle = new HomeModle();
    }

    @Override
    public void getVertical(Map<String, String> params) {
            modle.getVertical(params, new HttpUtils.HttpCallBack<DataBean>() {
                @Override
                public void onSucess(MyHttpBody<DataBean> body) {
                   DataBean bean= body.getT();
                }

                @Override
                public void onFaile(int erroCode, Throwable throwable) {
                    throwable.printStackTrace();
                }
            });
    }
}
